const http = require('http');
const $ = require('cheerio');

console.log($);
$("#kkk").find(".cc1");

//测试简单爬虫
const url = 'http://www.imooc.com/learn/348';
http.get(
    url,
    function (req) {
        var html ="";

        //console.log(req.constructor);

        req.on('data', function(data){
            html += data;
        });

        req.on('end', function(){
            console.log(html);
        });
    }
).on('error', function(error){
    console.log(error);
});
